<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=702439

This test verifies that child iframes of CSP documents are
permitted to execute javascript: URLs assuming the policy
allows this.
-->
<head>
  <title>Test for Bug 702439</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<iframe id="i"></iframe>
<script class="testbody" type="text/javascript">
var javascript_link_ran = false;

// check that the script in the child frame's javascript: URL ran
function checkResult()
{
  is(javascript_link_ran, true,
     "javascript URL didn't execute");

  SimpleTest.finish();
}

SimpleTest.waitForExplicitFinish();
document.getElementById('i').src = 'file_subframe_run_js_if_allowed.html';
</script>
</body>
</html>
